﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCe4Mvc3Application1.Models
{
    public partial class _Settings_SiteSettingsPartRecord : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Settings_SiteSettingsPartRecord>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Settings_SiteSettingsPartRecord() : base("Settings_SiteSettingsPartRecord")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Id = "Id";
        public RaisingStudio.Data.Expressions.ColumnExpression Id { get { return _Id; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SiteSalt = "SiteSalt";
        public RaisingStudio.Data.Expressions.ColumnExpression SiteSalt { get { return _SiteSalt; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SiteName = "SiteName";
        public RaisingStudio.Data.Expressions.ColumnExpression SiteName { get { return _SiteName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SuperUser = "SuperUser";
        public RaisingStudio.Data.Expressions.ColumnExpression SuperUser { get { return _SuperUser; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _PageTitleSeparator = "PageTitleSeparator";
        public RaisingStudio.Data.Expressions.ColumnExpression PageTitleSeparator { get { return _PageTitleSeparator; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _HomePage = "HomePage";
        public RaisingStudio.Data.Expressions.ColumnExpression HomePage { get { return _HomePage; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SiteCulture = "SiteCulture";
        public RaisingStudio.Data.Expressions.ColumnExpression SiteCulture { get { return _SiteCulture; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ResourceDebugMode = "ResourceDebugMode";
        public RaisingStudio.Data.Expressions.ColumnExpression ResourceDebugMode { get { return _ResourceDebugMode; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _PageSize = "PageSize";
        public RaisingStudio.Data.Expressions.ColumnExpression PageSize { get { return _PageSize; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Settings_SiteSettingsPartRecord Settings_SiteSettingsPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Settings_SiteSettingsPartRecord Settings_SiteSettingsPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Settings_SiteSettingsPartRecord);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Settings_SiteSettingsPartRecord Settings_SiteSettingsPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Settings_SiteSettingsPartRecord.Id,
                            Settings_SiteSettingsPartRecord.SiteSalt,
                            Settings_SiteSettingsPartRecord.SiteName,
                            Settings_SiteSettingsPartRecord.SuperUser,
                            Settings_SiteSettingsPartRecord.PageTitleSeparator,
                            Settings_SiteSettingsPartRecord.HomePage,
                            Settings_SiteSettingsPartRecord.SiteCulture,
                            Settings_SiteSettingsPartRecord.ResourceDebugMode,
                            Settings_SiteSettingsPartRecord.PageSize,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Settings_SiteSettingsPartRecord>(_Settings_SiteSettingsPartRecord Settings_SiteSettingsPartRecord)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Settings_SiteSettingsPartRecord>(Settings_SiteSettingsPartRecord);
        }


        #region IQueryExpression<_Settings_SiteSettingsPartRecord> 成员

        _Settings_SiteSettingsPartRecord RaisingStudio.Data.Expressions.IQueryExpression<_Settings_SiteSettingsPartRecord>.Value
        {
            get { return Settings_SiteSettingsPartRecord._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Settings_SiteSettingsPartRecord
    {
        #region Members
        public static readonly _Settings_SiteSettingsPartRecord _ = new _Settings_SiteSettingsPartRecord();
		#endregion
    }
}
